{// 引入标签库 }
<tagLib name="fanwe" />
<include file="Public:header" />
<div id="main" class="main" >
<div class="content">
<div class="title">{$Think.lang.EDIT_DATA} [ <a href="{:u($module_name.'/'.$back_action,$param_back)}">{$Think.lang.BACK_LIST}</a> ]  
</div>
<div id="result" class="result none"></div>
<table cellpadding=0 cellspacing=0 class="dataEdit" >
<if condition="$vo['rec_module'] eq 'Feedback'">
<form method='post' id="form" name="form" action="{:u($module_name.'/update')}"  enctype="multipart/form-data">
<tr>
	<td class="tRight" width="120">主题：</td>
	<td class="tLeft" ><input type="text" name="title" value="{$vo.title}" style="width:450px" /> </td>
</tr>
<tr> 
	<td class="tRight tTop">{$Think.lang.MESSAGE_NAME}：</td>
	<td class="tLeft">
		{$vo['user_name']}
	</td>
</tr>
<tr> 
	<td class="tRight tTop">联系方式：</td>
	<td class="tLeft">
		{$vo.tel}&nbsp;
	</td>
</tr>
<tr> 
	<td class="tRight tTop">Email：</td>
	<td class="tLeft">
		{$vo.user_email}&nbsp;
	</td>
</tr>
<tr> 
	<td class="tRight tTop">QQ/MSN：</td>
	<td class="tLeft">
		{$vo.qq_msn}&nbsp;
	</td>
</tr>
<tr> 
	<td class="tRight tTop">{$Think.lang.MESSAGE_CONTENT}：</td>
	<td class="tLeft">
    	<textarea name="content" class="bLeft" style="width:80%; height:100px;">{$vo.content}</textarea>
	</td>
</tr>
<tr>
	<td></td>
	<td class="center"><div style="width:85%;margin:5px">
	<input type="hidden" name="id" value="{$vo.id}" />
	<input type="submit" value="{$Think.lang.SAVE_DATA}"  class="button small"> <input type="reset" class="button small" onclick="resetEditor()" value="{$Think.lang.RESET_DATA}" > 
	</div></td>
</tr>
</form>
<elseif condition="$vo['rec_module'] eq 'Site'" />
<form method='post' id="form" name="form" action="{:u($module_name.'/autoAddUser')}"  enctype="multipart/form-data">
<load href="__TMPL__ThemeFiles/Js/jquery.js" />
<load href="__TMPL__ThemeFiles/Js/jquery.json.js" />
<load href="__TMPL__ThemeFiles/Js/model.js" />
<tr>
	<td class="tRight" width="120">网站名称：</td>
	<td class="tLeft" >
    	<select id="site_id" name="site_id">
            <option value="0">=={$Think.lang.SELECT}==</option>
        </select>
    	<input type="text" id="title" name="title" value="{$vo.title}"/>&nbsp;
        <input type="button" class="search-site" value="{$Think.lang._SEARCH_DATA}" style="cursor:pointer;" onclick="$.searchSite('#title','#site_id');" />
        （如果不选择，将自动生成导航站点）
    </td>
</tr>
<tr> 
	<td class="tRight tTop">站点标识符：</td>
	<td class="tLeft">
		<input type="text" id="site_key" name="site_key" />&nbsp;<span style="color:#f00; display:none" id="key-exists">唯一标识符已存在</span>
	</td>
</tr>
<tr> 
	<td class="tRight tTop">&nbsp;</td>
	<td class="tLeft">
		自动生成导航站点时使用
	</td>
</tr>
<tr> 
	<td class="tRight tTop">网站类别：</td>
	<td class="tLeft">
		<select name="rec_id" id="rec_id">
            <foreach name="siteCates" item="cate">
            <option value="{$cate.id}" <if condition="$cate['id'] eq $vo['rec_id']">selected</if>>{$cate.name}</value>
            </foreach>
        </select>
	</td>
</tr>
<tr> 
	<td class="tRight tTop">网站地址：</td>
	<td class="tLeft">
		<input type="text" name="content" value="{$vo.content}" style="width:450px" />
	</td>
</tr>
<tr> 
	<td class="tRight tTop">用户名：</td>
	<td class="tLeft">
		<input type="text" name="user_name" value="{$vo.user_name}" />
	</td>
</tr>
<tr> 
	<td class="tRight tTop">帐号：</td>
	<td class="tLeft">
		<input type="text" name="user_email" value="{$vo.user_email}" />
	</td>
</tr>
<tr> 
	<td class="tRight tTop">联系电话：</td>
	<td class="tLeft">
		<input type="text" name="tel" value="{$vo.tel}" />
	</td>
</tr>
<tr> 
	<td class="tRight tTop">接口类型：</td>
	<td class="tLeft">
		<select name="rule_type" id="rule_type" >
        <option value="0">请选择</option>
        <foreach name="ruleType" item="rt_item">
        <option value="{$rt_item.id}" <if condition="$rt_item['id'] eq $vo['score']">selected</if>>{$rt_item.name}</option>
        </foreach>
        </select>
	</td>
</tr>
<tr> 
	<td class="tRight tTop">QQ：</td>
	<td class="tLeft">
		<input type="text" name="qq_msn" value="{$vo.qq_msn}" />
	</td>
</tr>
<tr> 
	<td class="tRight tTop">接口信息：</td>
	<td class="tLeft">
		<textarea name="api" style="width:80%; height:100px;">{$vo.api}</textarea>
	</td>
</tr>
<tr>
	<td>&nbsp;</td>
	<td class="center"><div style="width:85%;margin:5px">
	<input type="hidden" name="id" value="{$vo.id}" />
    <input type="submit" value="生成"  class="button small">
	</div></td>
</tr>
<script type="text/javascript">
jQuery(function($){
	$("#site_key").blur(function(){
		var key = this.value;
		var sid = $("#site_id").val();

		if(key == "")
			return false;
			
		$.ajax({
			url: APP+"?"+VAR_MODULE+"=Site&"+VAR_ACTION+"=checkKey",
			cache: false,
			data:{"key":key,"id":sid},
			success:function(data)
			{
				if(data == 1)
					$("#key-exists").hide();
				else
					$("#key-exists").show();	
			}
		});	
	});			
});
</script>
</form>
</if>
</table>
</div>
</div>
